const dic = {
  status_type: [
    { label: '打开', value: '0' },
    { label: '关闭', value: '1' }
  ],
  risk_type: [
    { label: '供应商风险', value: '0' },
    { label: '寻源风险', value: '1' },
    { label: '物料风险', value: '2' },
    { label: '合同风险', value: '3' }
  ],
  riskLevel: [
    { label: 'Y', value: '0' },
    { label: 'R', value: '1' },
    { label: 'A', value: '2' },
    { label: 'G', value: '3' }
  ]
}

export const option = {
  border: true,
  stripe: true,
  addBtn: false,
  editBtn: false,
  viewBtn: false,
  printBtn: false,
  simplePage: true,
  selection: true,
  reserveSelection: false,
  tip: false,
  selectable:(row,index)=>{
    return row.status === '1'
  },
  searchBtnText: '搜索',
  emptyBtnText: '清空',
  dialogType: 'drawer',
  align: 'center',
  searchMenuSpan: 6, //搜索按钮是否单独成行
  index: true,
  indexLabel: '序号',
  column: [
    {
      label: '风险编码',
      prop: 'riskCode',
      searchLabelWidth: 110, //搜索label宽度
      search: true, //启动搜索
      searchSpan: 6, // 搜索栏 布局
      minWidth: 120
    },
    {
      label: '风险名称',
      prop: 'riskName',
      searchLabelWidth: 110, //搜索label宽度
      search: true, //启动搜索
      searchSpan: 6, // 搜索栏 布局
      minWidth: 150
    },
    {
      label: '风险类型',
      prop: 'riskType',
      type: 'select',
      dicData: dic.risk_type,
      searchLabelWidth: 110, //搜索label宽度
      searchMultiple:true,
      search: true, //启动搜索
      searchSpan: 6, // 搜索栏 布局
      minWidth: 150
    },
    {
      label: '类型编码',
      prop: 'typeCode',
      searchLabelWidth: 110, //搜索label宽度
      search: true, //启动搜索
      searchSpan: 6, // 搜索栏 布局
      minWidth: 150
    },
    {
      label: '类型名称',
      prop: 'typeName',
      searchLabelWidth: 110, //搜索label宽度
      search: true, //启动搜索
      searchSpan: 6, // 搜索栏 布局
      minWidth: 150
    },
    {
      label: '综合风险等级',
      type: 'select',
      prop: 'riskLevel',
      dicData: dic.riskLevel,
      props: {
        label: 'label',
        value: 'value'
      },
      slot: true,
      searchLabelWidth: 110,
      searchMultiple:true,
      searchSpan: 6,
      search: true,
      minWidth: 120
    },
    {
      label: '创建人',
      prop: 'creater',
      searchLabelWidth: 110,
      searchSpan: 6,
      search: true,
      minWidth: 100
    },
    {
      label: '创建日期',
      prop: 'createTime',
      type: 'datetime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      minWidth: 140
    },
    {
      label: '状态',
      prop: 'status',
      type: 'select',
      dicUrl: '/api/blade-system/dict-biz/dictionary?code=supplier_recommend_status',
      props: {
        label: 'dictValue',
        value: 'dictKey'
      },
      searchLabelWidth: 110,
      searchMultiple:true,
      searchSpan: 6,
      slot: true,
      search: true,
      minWidth: 100
    }
  ]
}

export const page = {
  currentPage: 1,
  total: 40,
  layout: 'total, sizes, prev, pager, next, jumper',
  pageSizes: [10, 20, 50, 100],
  pageSize: 10
}
